#! /bin/bash
set -xe
ELASTICSEARCH_ADDR=${ELASTICSEARCH_ADDR:-'elasticsearch'}
ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT:-'9200'}
curl --location --request PUT "http://${ELASTICSEARCH_ADDR}:${ELASTICSEARCH_PORT}/dataset_open_text?pretty"
curl --location --request PUT "http://${ELASTICSEARCH_ADDR}:${ELASTICSEARCH_PORT}/_all/_settings" \
--header 'Content-Type: application/json' \
--data '{
    "index": {
        "max_result_window": 2000000000
    }
}'